package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {


    void insertbatch(List<DishFlavor> flavors);
//    菜品id来删除口味数据
@Delete("delete from dish_flavor where dish_id = #{dishTd}")
    void deletedishById(Long id);
//根据菜品集合批量删除关联口味
    void deletedishByIds(List<Long> dishIds);
//根据菜品id查询对应口味数据
    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getBydishId(Long dishId);
}
